package com.sgb.goods.view.adapter;

import android.content.Context;
import android.text.TextUtils;

import androidx.databinding.ViewDataBinding;

import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.goods.R;
import com.sgb.goods.entity.AppointEntity;
import com.sgb.goods.utils.base.adapter.BaseCommonAdapter;

/**
 * AppointInfoTxtAdapter
 * @author cyj
 */
public class AppointInfoTxtAdapter extends BaseCommonAdapter<AppointEntity.Field> {

    public AppointInfoTxtAdapter() {
        super(R.layout.goods_item_appoint_txt);
    }

    @Override
    protected void convert(BaseViewHolder baseHolder, ViewDataBinding dataBinding, AppointEntity.Field entity) {
        baseHolder.setText(R.id.tv_key, entity.fieldName);
        baseHolder.setText(R.id.tv_value, TextUtils.isEmpty(entity.fieldValue) ? "/" : entity.fieldValue);
    }
}